import axios  from 'axios'

const serve = axios.create({
  baseURL:'http://localhost:3001/',
  timeout:5000
})

serve.interceptors.request.use(config => {
  return config
},error => {
  Promise.reject(error)
})


serve.interceptors.response.use(response => {
  return response.data
},error => {
  return Promise.reject(error)
})

export default serve